// $codepro.audit.disable com.instantiations.assist.eclipse.analysis.deserializeabilitySecurity
package org.mysofts.eclipseman.util;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

/**
 * Log unique de l'application.
 * 
 * @author reda
 * 
 */
public final class AppLog {
	/**
	 * Objet log de base.
	 */
	private static final Log LOG = LogFactory.getLog("eclipse-man"); //$NON-NLS-1$

	// [start] constructeurs
	static {
		LOG.info("Création du log"); //$NON-NLS-1$
		// TODO Spécifier le niveau de log.
	}

	/**
	 * Constructeur privé.
	 */
	private AppLog() {
		super();
	}

	// [end]

	/**
	 * Retourne l'objet {@link log} de l'application.
	 * 
	 * @return Objet {@link log} de l'application.
	 */
	public static Log logObject() {
		return LOG;
	}

	// [start] delegate statique du log de l'application
	/**
	 * @param msg
	 *            Message du log
	 * @param ex
	 *            Exception d'origine du log
	 * @see org.apache.commons.logging.Log#debug(java.lang.Object,
	 *      java.lang.Throwable)
	 */
	public static void debug(final Object msg, final Throwable ex) {
		LOG.debug(msg, ex);
	}

	/**
	 * @param msg
	 *            Message du log
	 * @see org.apache.commons.logging.Log#debug(java.lang.Object)
	 */
	public static void debug(final Object msg) {
		LOG.debug(msg);
	}

	/**
	 * @param msg
	 *            Message du log
	 * @param ex
	 *            Exception d'origine du log
	 * @see org.apache.commons.logging.Log#error(java.lang.Object,
	 *      java.lang.Throwable)
	 */
	public static void error(final Object msg, final Throwable ex) {
		LOG.error(msg, ex);
	}

	/**
	 * @param msg
	 *            Message du log
	 * @see org.apache.commons.logging.Log#error(java.lang.Object)
	 */
	public static void error(final Object msg) {
		LOG.error(msg);
	}

	/**
	 * @param msg
	 *            Message du log
	 * @param ex
	 *            Exception d'origine du log
	 * @see org.apache.commons.logging.Log#fatal(java.lang.Object,
	 *      java.lang.Throwable)
	 */
	public static void fatal(final Object msg, final Throwable ex) {
		LOG.fatal(msg, ex);
	}

	/**
	 * @param msg
	 *            Message du log
	 * @see org.apache.commons.logging.Log#fatal(java.lang.Object)
	 */
	public static void fatal(final Object msg) {
		LOG.fatal(msg);
	}

	/**
	 * @param msg
	 *            Message du log
	 * @param ex
	 *            Exception d'origine du log
	 * @see org.apache.commons.logging.Log#info(java.lang.Object,
	 *      java.lang.Throwable)
	 */
	public static void info(final Object msg, final Throwable ex) {
		LOG.info(msg, ex);
	}

	/**
	 * @param msg
	 *            Message du log
	 * @see org.apache.commons.logging.Log#info(java.lang.Object)
	 */
	public static void info(final Object msg) {
		LOG.info(msg);
	}

	/**
	 * @return boolean object
	 * @see org.apache.commons.logging.Log#isDebugEnabled()
	 */
	public static boolean isDebugEnabled() {
		return LOG.isDebugEnabled();
	}

	/**
	 * @return boolean object
	 * @see org.apache.commons.logging.Log#isErrorEnabled()
	 */
	public static boolean isErrorEnabled() {
		return LOG.isErrorEnabled();
	}

	/**
	 * @return boolean object
	 * @see org.apache.commons.logging.Log#isFatalEnabled()
	 */
	public static boolean isFatalEnabled() {
		return LOG.isFatalEnabled();
	}

	/**
	 * @return boolean object
	 * @see org.apache.commons.logging.Log#isInfoEnabled()
	 */
	public static boolean isInfoEnabled() {
		return LOG.isInfoEnabled();
	}

	/**
	 * @return boolean object
	 * @see org.apache.commons.logging.Log#isTraceEnabled()
	 */
	public static boolean isTraceEnabled() {
		return LOG.isTraceEnabled();
	}

	/**
	 * @return boolean object
	 * @see org.apache.commons.logging.Log#isWarnEnabled()
	 */
	public static boolean isWarnEnabled() {
		return LOG.isWarnEnabled();
	}

	/**
	 * @param msg
	 *            Message du log
	 * @param ex
	 *            Exception d'origine du log
	 * @see org.apache.commons.logging.Log#trace(java.lang.Object,
	 *      java.lang.Throwable)
	 */
	public static void trace(final Object msg, final Throwable ex) {
		LOG.trace(msg, ex);
	}

	/**
	 * @param msg
	 *            Message du log
	 * @see org.apache.commons.logging.Log#trace(java.lang.Object)
	 */
	public static void trace(final Object msg) {
		LOG.trace(msg);
	}

	/**
	 * @param msg
	 *            Message du log
	 * @param ex
	 *            Exception d'origine du log
	 * @see org.apache.commons.logging.Log#warn(java.lang.Object,
	 *      java.lang.Throwable)
	 */
	public static void warn(final Object msg, final Throwable ex) {
		LOG.warn(msg, ex);
	}

	/**
	 * @param msg
	 *            Message du log
	 * @see org.apache.commons.logging.Log#warn(java.lang.Object)
	 */
	public static void warn(final Object msg) {
		LOG.warn(msg);
	}
	// [end]
}
